<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html{
            /* 浏览器高度 */
            height: 100%;
        }
        body{
            /* 问html */
            height: 100%;
        }
        .box{
            /* px 像素 %和父容器的尺寸相关 */
            /* width: 100px; */
            /* width: 100%; */
            width: 50vw;
            /* height: 100px; */
            /* 父元素，父容器，body */
            height: 100%;
            background-color: skyblue;
        }
    </style>
</head>
<body>
<div class="box"></div>
</body>
</html>